package com.jyx.manage_course.controller;

import com.jyx.api.course.CourseViewControllerApi;
import com.jyx.framework.domain.portalview.PreViewCourse;
import com.jyx.manage_course.service.CourseViewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/portalview/course")
public class CourseViewController implements CourseViewControllerApi {
    @Autowired
    CourseViewService courseViewService;

    @Override
    @GetMapping("/get/{id}")
    public PreViewCourse queryCourseViewById(@PathVariable("id")String courseId){
        return courseViewService.queryCourseViewById(courseId);
    }
}
